class Solution {
public:
    int countCompleteDayPairs(vector<int>& hours)
    {
        int n = hours.size();
        int ans = 0;
        int cnt[24] = { 0 };
        for (auto& a : hours) ans += cnt[(24 - (a % 24)) % 24], cnt[a % 24]++;


        return ans;
    }
};